package com.k7.mobile.platform.dataobject;

import java.net.URLEncoder;

import com.k7.mobile.platform.web.support.RedisConstants;


public class QueryDO extends BaseDO {
	
	private static final long serialVersionUID = -5867186698297780738L;
	
	private Integer typeId;		//游戏类型id
	private Integer btype;	
	private Integer payId;
	private Integer languageId;
	private String keyword;
	public Integer getTypeId() {
		return typeId;
	}
	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public Integer getBtype() {
		return btype;
	}
	public void setBtype(Integer btype) {
		this.btype = btype;
	}
	public Integer getPayId() {
		return payId;
	}
	public void setPayId(Integer payId) {
		this.payId = payId;
	}
	public Integer getLanguageId() {
		return languageId;
	}
	public void setLanguageId(Integer languageId) {
		this.languageId = languageId;
	}
	
	@Override
	public String genCacheKey() {
		return this.getTypeId() + RedisConstants.DEFAULT_CACHE_FIELD_SEPARATOR+ 
				this.getBtype() + RedisConstants.DEFAULT_CACHE_FIELD_SEPARATOR+ 
				this.getPayId() + RedisConstants.DEFAULT_CACHE_FIELD_SEPARATOR+ 
				this.getLanguageId() + RedisConstants.DEFAULT_CACHE_FIELD_SEPARATOR+ 
				URLEncoder.encode(this.getKeyword()) + RedisConstants.DEFAULT_CACHE_FIELD_SEPARATOR+ 
				this.getPerPageSize() + RedisConstants.DEFAULT_CACHE_FIELD_SEPARATOR+ 
				this.getToPage();
	}	
}
